﻿#ifndef __SS_LOG_H__
#define __SS_LOG_H__
#include "../ssSingleton.h"
#include "./ssLogBase.h"


namespace StarSeeker
{

class ssLog : public ssLogBase
{
public:
	// 构造和析构
	ssLog();
	ssLog(u8 type, const char* path);
	~ssLog();
	//输出日志
	void OutPut(SS_LOG_TYPE type, const char *pLogString);
	void OutPutEx(SS_LOG_TYPE type, const char *pLogString, ...);
	//兼容旧函数
	void PrintDebug(const char *pLogString);
	void PrintDebugEx(const char *pLogString, ...);
	void Print(const char *pLogString);
	void PrintEx(const char *pLogString, ...);
	void Error(const char *pLogString);
	void ErrorEx(const char *pLogString, ...);
	//只写入文件
	void PrintFile(const char *pLogString);
	void PrintFileEx(const char *pLogString, ...);

private:
	void PrintBuffer(SS_LOG_TYPE type);

	ssString		m_buffer;
};

}

#define SS_SLOG StarSeeker::ssSingle<StarSeeker::ssLog>::instance()

#endif
